'use strict';

function Person(name, age, family) {
  var self = {};
  self.name = name;
  self.age = age;
  self.family = [...family];
  return self;
}

let p = Person('ken', 18, ['a', 'b']);
let x = Person('suan', 18, ['c', 'd']);
x.family.push('e');
console.log(p, x);
